package com.hj.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 购物车的每个商品
 *
 * @author haoshen
 * @version 1.0
 */
@Data
public class CartProductVo {
    private Integer id;
    private Integer userId;
    private Integer productId;
    /**
     * 此种商品数量
     */
    private Integer quantity;
    private String proName;
    private String proMainImage;
    private BigDecimal proPrice;
    private Integer proStatus;
    private BigDecimal proTotalPrice;
    private Integer proStock;
    /**
     * 是否被选中
     */
    private Integer checked;
    /**
     * 限制数量  不可超过此数目
     */
    private Integer limitQuantity;

    public BigDecimal getProTotalPrice() {
        return proPrice.multiply(new BigDecimal(quantity));
    }
}
